﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OFB.BLL.Context;

namespace OFB.BLL.Repository
{
    public class ReportFeedbackCriteriaBLL
    {
        private ReportFeedbackCriteriaContext context;

        public ReportFeedbackCriteriaBLL()
        {
            context = new ReportFeedbackCriteriaContext();
        }

        public ICollection<ViewModel.ReportFeedbackCriteriaViewModel> CountFbQuestion(int courseId)
        {
            return context.FeedbackCriteria.Init("Report_CountFeedbackQuestion",
                                                        context.FeedbackCriteria.BuildParameter("CourseId", System.Data.DbType.Int32, courseId))
                                            .MapCollection<ViewModel.ReportFeedbackCriteriaViewModel>().GetCollection();
        }
    }
}
